import { cityApi } from '../../../utils/api';

const getCityData = (cityList) => {
  return {
    type: "City",
    cityList,
  }
}

export const getCityDataAsync = () => {
  return async (dispatch) => {
    const res = await cityApi();
    console.log(res);
    dispatch(getCityData(res.data.result));
  }
}